Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix signed/unsigned mismatch in VS #1970

Merged
merged 1 commit into from
Jun 13, 2021
Merged

Fix signed/unsigned mismatch in VS #1970

merged 1 commit into from
Jun 13, 2021

Conversation

bansan85
Copy link
Contributor

When building under VS, I have:

[build] [...]\vcpkg\installed\x64-windows\include\spdlog\details\os-inl.h(362,25): warning C4365: 'argument': conversion from 'int' to 'DWORD', signed/unsigned mismatch [[...].vcxproj]

This small patch just fix it.

It should be compatible with std::chrono::milliseconds where the type of the argument is part of the template;

@gabime
Copy link
Owner

gabime commented Jun 13, 2021

Wouldn’t that cause warning about int to unsigned int convertions? e.g here

details::os::sleep_for_millis(open_interval_);
(where open_interval_ is int).

@bansan85
Copy link
Contributor Author

You're right. I should have checked. I only checked if the library build without warning only for my project and not for the whole library.

I also fix two other signed/unsigned mismatch.

I only modify source to remove warnings. I know that I probably should have wrote unsigned int x = 10U but VS didn't complains.

@gabime gabime merged commit 7a7611e into gabime:v1.x Jun 13, 2021
@gabime
Copy link
Owner

gabime commented Jun 13, 2021

Thanks @bansan85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants